package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.SelfAmmunition;
import com.sc.nft.entity.vo.SelfAmmunitionDetailVO;
import com.sc.nft.entity.vo.SelfAmmunitionPageVO;
import com.sc.nft.entity.vo.SelfAmmunitionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 张超
* @description 针对表【sc_self_ammunition(自弹活动引导图)】的数据库操作Mapper
* @createDate 2024-06-04 13:29:51
* @Entity generator.domain.SelfAmmunition
*/
@Mapper
public interface SelfAmmunitionMapper extends BaseMapper<SelfAmmunition> {

    /**
     * 校验名称是否存在
     * @param selfAmmunitionName
     * @param jumpType
     * @param id
     * @return
     */
    Integer checkSelfAmmunitionSelfAmmunitionName(@Param("selfAmmunitionName") String selfAmmunitionName,@Param("jumpType") Integer jumpType,@Param("id") Long id);

    /**
     * 获取自弹列表
     * @param mp
     * @return
     */
    IPage<SelfAmmunitionPageVO> selfAmmunitionPage(Page mp);

    /**
     * 判断上架是否超过五个
     * @return
     */
    Integer checkSelfAmmunitionIsListing();

    /**
     * 保存展示的引导图到redis 五个
     * @return
     */
    List<SelfAmmunitionVO> getSelfAmmunitionIsListing();

    /**
     * 获取引导图详情
     * @param id
     * @return
     */
    SelfAmmunitionDetailVO selfAmmunitionDetail(@Param("id") Long id);
}




